package org.speed.mes.base.domain.bo;

import org.speed.mes.base.domain.BsProduct;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 产品业务对象 bs_product
 *
 * @author speed-mes
 * @date 2024-06-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BsProduct.class, reverseConvertGenerate = false)
public class BsProductBo extends BaseEntity {

    /**
     * 产品id
     */
    @NotNull(message = "产品id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 产品编码
     */
    @NotBlank(message = "产品编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String code;

    /**
     * 产品名称
     */
    @NotBlank(message = "产品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 规格型号
     */
    private String model;

    /**
     * 计量单位
     */
    @NotBlank(message = "计量单位不能为空", groups = { AddGroup.class, EditGroup.class })
    private String unit;

    /**
     * 标准小时产能
     */
    private Long capacity;

    /**
     * 产品类型id
     */
    @NotNull(message = "产品类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long typeId;

    /**
     * 工艺路线id
     */
    @NotNull(message = "工艺路线不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long processRouteId;

    /**
     * 是否启用 0停用 1启用
     */
    private String status;

    /**
     * 装箱数量
     */
    private BigDecimal packNumber;

    /**
     * 排序
     */
    private Long sort;

    /**
     * 备注
     */
    private String remark;
}
